import { nFormatter } from '@/utils/nFormatter'

export default {
  backgroundColor: '#1c213e',
  tooltip: {
    formatter: function(val = {}) {
      const { data = {} } = val
      const { hour, value } = data
      return `${hour}:00<br>抄表读数:${value}`
    }
  },
  xAxis: {
    boundaryGap: false,
    splitLine: {
      lineStyle: {
        color: '#31597d',
        type: 'dashed'
      }
    },
    nameTextStyle: {
      color: '#fff'
    }
  },
  yAxis: {
    name: '用气量',
    type: 'value',
    splitLine: {
      lineStyle: {
        color: '#31597d',
        type: 'dashed'
      }
    },
    nameTextStyle: {
      color: '#fff'
    },
    axisLabel: {
      formatter: function(val) {
        return nFormatter(val)
      }
    }
  },
  series: [],
  grid: {
    top: 35,
    left: '12%',
    right: '3%',
    bottom: 35
  }
}
